updating oE float32_to_atom
float32_to_atom
include convert.e namespace convert public function float32_to_atom(sequence_4 ieee32)
converts a sequence of 4 bytes in IEEE 32-bit format to an atom.
Parameters:
- ieee32 : the sequence to convert.
Returns:
An atom, the same value as the FPU would see by peeking ieee64 from RAM.
Comments:
Any 32-bit IEEE floating-point number can be converted to an atom.
Example 1:
f = repeat(0, 4) fn = open("numbers.dat", "rb") -- read binary f[1] = getc(fn) f[2] = getc(fn) f[3] = getc(fn) f[4] = getc(fn) a = float32_to_atom(f)
See Also:
Not Categorized, Please Help
|